package com.gouaixin.bee.beeframework2.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.gouaixin.bee.beeframework2.R;
import com.gouaixin.bee.beeframework2.bean.ZHENXINHUA;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2015/4/9.
 */
public class ZhenxinhuaAdapter extends BaseAdapter {

    Context context;
    List<ZHENXINHUA> datas=new ArrayList<ZHENXINHUA>();


    public ZhenxinhuaAdapter(Context context) {
        this.context=context;
    }

    public void setData(List<ZHENXINHUA> datas) {
        this.datas=datas;
    }


    @Override
    public int getCount() {
        if(datas!=null){
            return datas.size();
        }
        return 0;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        TextView mView= (TextView) LayoutInflater.from(context).inflate(R.layout.item_zhenxinhua,null);
        mView.setText(datas.get(position).getWenti());


        return mView;
    }
}
